using System.Collections.Generic;

namespace FwkLight.Application
{
  public abstract class BaseApplicationTaskBase
  {
    public event TaskExecutionEventHandler ExecutionFailed;
    public event TaskExecutionEventHandler ExecutionSucceed;

    protected void InvokeExecutionFailed(IList<ValidationData> validationData)
    {
      TaskExecutionEventHandler failed = ExecutionFailed;
      if (failed != null) failed(validationData);
    }

    protected void InvokeExecutionSucceed(IList<ValidationData> validationData)
    {
      TaskExecutionEventHandler succeed = ExecutionSucceed;
      if (succeed != null) succeed(validationData);
    }
  }
}